#ifndef __CONF_MAIN_H__
#define __CONF_MAIN_H__

#include <map>
#include <string>
#include "log_writer.h"

namespace tools::conf
{
	class conf
	{
		#define OK			0
		#define ERROR			1
		#define KEY_EXIST		0
		#define KEY_NOT_EXIST		1
		public:
			conf();
			virtual ~conf();
		public:
			int init(const char*);
			int clear();
			int getValue(const std::string &_key,std::string &_value);
			int isKeyExist(const std::string &_key,std::string &value = NULL);
			inline
			int getCount(int &_tmp_count);
		private:
			std::map<std::string,std::string> obj_map_key_value;	
			andrew::tools::log::log_writer obj_log_writer;
	};
}

#endif
